package com.ham.mud.commands;

import com.ham.mud.ServerConnection;
import com.ham.mud.characters.player.Player;
import com.ham.mud.rooms.RoomService;
import com.ham.mud.rooms.Zone;

/**
 * Created by hlucas on Jul 21, 2011 at 10:57:27 AM
 */
public class WhereCommand extends PlayerCommand {
    @Override
    public void execute(ServerConnection connection, String[] params) {
        Player player = connection.getPlayer();
        String zoneFileName = player.getZone();
        Zone zone = RoomService.getZone(zoneFileName);
        zone.display(connection);
    }

    @Override
    protected String getCommandName() {
        return "where";
    }
}
